package cn.gcjxsc.service.merchant;

import cn.gcjxsc.entity.merchant.Store;
import cn.gcjxsc.repository.merchant.StoreRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author pumbaa
 * @since 1.0
 */
@Service
public class StoreService {
    @Autowired
    private StoreRepository storeRepository;

    /**
     * 根据id查询店铺信息
     * @param id 店铺id
     * @return
     */
    public Store findById(Integer id) {
        return storeRepository.findOne(id);
    }

    /**
     * 查询店铺集
     * @param ids 店铺id集
     * @return
     */
    public List<Store> findByIds(List<Integer> ids) {
        return storeRepository.findAll(ids);
    }
}
